home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #4 / K-CD-4-2002.ISO / Empire Earth / EEDemo.exe / Disk1 / data.ssa / unit ai scripts_priest prophet.tai < prev    next >
Encoding:
Text File  |  2001-09-29  |  1.7 KB  |  91 lines

  1. //
  2. // Priest Prophet unit AI file
  3. //
  4. // Behaviors:
  5. //
  6. //        At players request, convert enemy units.  Heal friendlies.  Cast calamities.
  7. //
  8. //    Notes:
  9. //
  10. //        Add transition from Idle when enemies spotted to flee.
  11. //
  12. //    Known Problems:
  13. //
  14.  
  15. FaceEnemyUnit
  16. {
  17.     allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
  18.     allof(GoalIsCalamity,FacingEnemyUnit) true(CalamityPreCast)
  19. }
  20.  
  21. ReacquireGoal
  22. {
  23.     allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
  24.     allof(GoalIsCalamity,UnitInWeaponRange) true(CalamityPreCast)
  25.     GoalIsCalamity true(PrepareToMove)
  26. }
  27.  
  28. CalamityPreCast
  29. {
  30.     CalamityTargetStillValid true(CastCalamity) false(Idle)
  31. }
  32.  
  33. // only for old saved games
  34. PrepareToCastCalamity
  35. {
  36.     AlwaysTrue true(CastCalamity)
  37. }
  38.  
  39. CastCalamity
  40. {
  41.     allof(OwnerIsHuman,OneSecondElapsed) true(Idle)
  42.     allof(OwnerIsComputer,OneSecondElapsed) true(PostCalamityFlee)
  43. }
  44.  
  45. GetNextMoveWaypoint
  46. {
  47.     allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
  48.     allof(GoalIsCalamity,NextWaypointRetrieved,UnitInWeaponRange) true(FaceEnemyUnit)
  49. }
  50.  
  51. PrepareToMove
  52. {
  53.     allof(GoalIsCalamity,UnitInWeaponRange) true(FaceEnemyUnit)
  54. }
  55.  
  56. InitialAttackState
  57. {
  58.     //Reloaded        false(WaitForReload)
  59.     GoalIsCalamity    true(PrepareToMove)
  60. }
  61.  
  62. PostCalamityFlee
  63. {
  64.     AlwaysTrue true(Idle)
  65. }
  66.  
  67. #include("Priest.tai")
  68.  
  69. // if nothing else works, at least go idle so that we can heal -rms
  70. UnderAttack
  71. {
  72.     AlwaysTrue true(Idle)
  73. }
  74.  
  75. #include("Healer.tai")
  76.  
  77. #include("Generic Movement.tai")
  78.  
  79. GetNextMoveWaypoint
  80. {
  81.     NextWaypointRetrieved remove()
  82.     allof(GoalIsCalamity,NextWaypointRetrieved) true(Advance)
  83.     GoalIsCalamity true(FaceEnemyUnit)
  84.     NextWaypointRetrieved true(LookForEnemies) false(TurnToUnitFacing)
  85. }
  86.  
  87. #include("Generic Death.tai")
  88.  
  89. #include("Move To Transport.tai");
  90.  
  91.